package com.creditcmsplt.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.creditcmsplt.entity.CreditCsv;
import com.creditcmsplt.mapper.CreditCsvMapper;
import com.creditcmsplt.service.CreditCsvService;

@Service
public class CreditCsvServiceImpl implements CreditCsvService{

	@Autowired
	private CreditCsvMapper creditCsvMapper;

	@Transactional
	public void insert(CreditCsv creditCsv) {
		creditCsvMapper.insert(creditCsv);
	}
	
	@Override
	public void update(String filename,String ffilename,Integer status) {
		creditCsvMapper.update(filename,ffilename, status);
	}

	@Override
	public CreditCsv checkDlownloadFlag(String downloadCode) {
		return creditCsvMapper.checkDlownloadFlag(downloadCode);
	}
	
	@Override
	public CreditCsv checkZipFlag(String filename) {
		return creditCsvMapper.checkZipFlag(filename);
	}
	
	@Override
	public List<CreditCsv> getZipFile(String filename) {
		return creditCsvMapper.getZipFile(filename);
	}
	
	@Override
	public CreditCsv getCreditCsvByDownloadCode(String downloadcode) {
		return creditCsvMapper.getCreditCsvByDownloadCode(downloadcode);
	}
	
	@Override
	public List<Map<String,Object>> getDownloadSizeInfoByDownloadcode(String downloadcode) {
		return creditCsvMapper.getDownloadSizeInfoByDownloadcode(downloadcode);
	}

}
